/// categoryTitle : ""
/// categoryList : [{"title":"","des":"","count":30},{"title":"","des":"","count":20},null]

class Category {
  String _categoryTitle;
  List<CategoryList> _categoryList;

  String get categoryTitle => _categoryTitle;

  set categoryTitle(String value) {
    _categoryTitle = value;
  }

  List<CategoryList> get categoryList => _categoryList;

  Category({String categoryTitle, List<CategoryList> categoryList}) {
    _categoryTitle = categoryTitle;
    _categoryList = categoryList;
  }

  Category.fromJson(dynamic json) {
    _categoryTitle = json["categoryTitle"];
    if (json["categoryList"] != null) {
      _categoryList = [];
      json["categoryList"].forEach((v) {
        _categoryList.add(CategoryList.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    var map = <String, dynamic>{};
    map["categoryTitle"] = _categoryTitle;
    if (_categoryList != null) {
      map["categoryList"] = _categoryList.map((v) => v.toJson()).toList();
    }
    return map;
  }

  set categoryList(List<CategoryList> value) {
    _categoryList = value;
  }
}

/// title : ""
/// des : ""
/// count : 30

class CategoryList {
  String _title;
  String _des;
  int _count;

  String get title => _title;

  String get des => _des;

  int get count => _count;

  CategoryList({String title, String des, int count}) {
    _title = title;
    _des = des;
    _count = count;
  }

  CategoryList.fromJson(dynamic json) {
    _title = json["title"];
    _des = json["des"];
    _count = json["count"];
  }

  Map<String, dynamic> toJson() {
    var map = <String, dynamic>{};
    map["title"] = _title;
    map["des"] = _des;
    map["count"] = _count;
    return map;
  }

  set count(int value) {
    _count = value;
  }

  set des(String value) {
    _des = value;
  }

  set title(String value) {
    _title = value;
  }
}
